﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using ViewRes;

namespace DiplomaWeb.Models.Account
{
    public class FormsAuthenticationService : IFormsAuthenticationService
    {
        public void SignIn(string userName)
        {
            if (String.IsNullOrEmpty(userName))
                throw new ArgumentException(AccountStrings.AccountMembershipService_ValidateUser_Value_cannot_be_null_or_empty_, "userName");

            FormsAuthentication.SetAuthCookie(userName, false);
        }

        public void SignOut()
        {
            FormsAuthentication.SignOut();
        }
    }
}